package dao;

import java.util.List;

import entityJPA.User;

/**
 * 
 * This interface defines the common methods for
 * JDBCUserDAO and JPAUserDAO classes.
 *
 */
public interface IUserDAO {

	/**
	 * Inserts into database a new user.       
	 * @param user       
	 */
	public void insert(User user);
	
	/**
	 * Updates a user in database.
	 * @param user        
	 */
	public void update(User user);

	/**
	 * Deletes a user from database.
	 * @param user
	 */
	public void delete(User user);

	/**
	 * Finds a specific position given the primary key.
	 * @param idUser
	 * @return a User instance which has the same idUser
	 */
	public User findById(int id);
	
	/**
	 * Finds all user in database.
	 * @return List<User>
	 */
	public List<User> findAll();



}
